import request from '@/sheep/request';

export default {
   //请求合同
   postDispatchContract: (params) =>
    request({
      url: 'api/dispatch/request_contract',
      method: 'POST',
      	params,
      custom: {
        showSuccess: false,
        successMsg: '',
        showError: true,
        errorMsg: '',
        showLoading: true,
        loadingMsg: '加载中',
        auth: true,
      },
    }),
    //请求合同
   postDispatchContractSignature: (params) =>
    request({
      url: 'api/dispatch/contract_signature',
      method: 'POST',
      	params,
      custom: {
        showSuccess: false,
        successMsg: '',
        showError: true,
        errorMsg: '',
        showLoading: true,
        loadingMsg: '加载中',
        auth: true,
      },
    }),
    // 获取邀请信息 （扫码之后获取）
    postDispatchInviteInfoView: (params) =>
        request({
          url: 'api/dispatch_invite_info/view',
          method: 'POST',
              params,
          custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
          },
        }),
        // 获取邀请信息 （扫码之后获取）同事
        postEntryInfoView: (params) =>
          request({
            url: 'api/entryinfo_invite_info/view',
            method: 'POST',
                params,
            custom: {
              showSuccess: false,
              successMsg: '',
              showError: true,
              errorMsg: '',
              showLoading: true,
              loadingMsg: '加载中',
              auth: true,
            },
          }),
    // 入职申请（1-插入数据/请求入职登记表链接）
    postDispatchAdd: (params) =>
      request({
        url: 'api/dispatch/add',
        method: 'POST',
            params,
        custom: {
          showSuccess: false,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: true,
          loadingMsg: '加载中',
          auth: true,
        },
      }),
    // 入职申请（2-个人签字）
    enrollmentSignature: (params) => 
      request({
        url:'/api/dispatch/enrollment_signature',
        method:'POST',
        custom:{
          auth: true,
          showSuccess: false
        },
        params
      }),
     // 入职申请（3-请求劳务合同）
    requestContact: (data) => 
      request({
        url:'/api/dispatch/request_contract',
        method:'POST',
        custom:{
          auth: true,
          showSuccess: false
        },
        data
      }),
    // 入职申请（4-合同签字）
    contactSignature: (data) => 
      request({
        url:'/api/dispatch/contract_signature',
        method:'POST',
        custom:{
          auth: true,
          showSuccess: true
        },
        data
      })
};
